import request from '@/utils/request.js'

export function publishArticle(query) { // 发布文章
  return request({
    url: 'api/article/publish',
    method: 'post',
    data: query
  })
}
export function updateArticle(query) { // 修改文章
  return request({
    url: 'api/article/publish',
    method: 'put',
    data: query
  })
}
export function articleDetail(query) { // 文章详情
  return request({
    url: 'api/article/detail',
    method: 'get',
    params: query
  })
}
export function addArticleReadCount(query) { // 文章详情
  return request({
    url: 'api/article/readCount/add',
    method: 'post',
    data: query
  })
}
export function addArticleLikeCount(query) { // 文章详情
  return request({
    url: 'api/article/likeCount/add',
    method: 'post',
    data: query
  })
}
export function articleIsLike(query) { // 文章详情
  return request({
    url: 'api/article/like',
    method: 'get',
    params: query
  })
}
export function nextArticle(query) { // 下一篇文章
  return request({
    url: 'api/article/next',
    method: 'get',
    params: query
  })
}

